package bp.App.GZSZ.model;

import bp.en.*;
import bp.port.EmpSettings;
import bp.wf.TransferCustomAttr;

/** 
 操作员 的摘要说明。
*/
public class PM_Customer extends EntityNo
{

	/**
	 操作员f
	*/
	public PM_Customer()
	{
	}
	@Override
	public UAC getHisUAC()
	{
		UAC uac = new UAC();
		if (bp.web.WebUser.getIsAdmin() == true)
		{
			uac.OpenAll();
		}
		else
		{
			uac.Readonly();
		}
		uac.IsInsert = false;
		uac.IsDelete = false;
		return uac;
	}
	/** 
	 重写基类方法
	*/
	@Override
	public Map getEnMap() {
		if (this.get_enMap() != null)
		{
			return this.get_enMap();
		}

		Map map = new Map("lzmispm.dbo.PM_Customer", "客户信息");
		map.setEnType(EnType.App);

		///#region 字段
		/*关于字段属性的增加 */
		map.AddTBStringPK(this.getPK(), null, "主键", false, false, 1, 500, 90);
		map.AddTBString("CR_CreditCode", null, "企业统一社会信用码", true, true, 0, 50, 100);
		map.AddTBString("CR_Code", null, "客户编号", true, true, 0, 50, 100);
		map.AddTBString("CR_ID", null, "NC_ID", true, true, 0, 18, 100);
		map.AddTBString("CR_Name", null, "客户名称", true, true, 0, 50, 100);
		map.AddTBString("CR_NameT", null, "NC_ID", true, true, 0, 50, 100);
		map.AddTBString("CR_CurrentName_TYC", null, "CR_CurrentName_TYC", true, true, 0, 50, 100);
		map.AddTBString("CR_UnitPlace", null, "单位地址", true, true, 0, 50, 100);
		map.AddTBString("CR_LegalPerson", null, "法人", true, true, 0, 50, 100);
		map.AddTBString("CR_TradeType", null, "客户类别", true, true, 0, 50, 100);
		map.AddTBString("CR_Telephone", null, "企业联系方式", true, true, 0, 50, 100);
		map.AddTBString("CR_CRType", null, "客户属性", true, true, 0, 50, 100);
		map.AddTBString("CR_AccountBank", null, "开户银行", true, true, 0, 50, 100);
		map.AddTBString("CR_Province", null, "NC_ID", true, true, 0, 50, 100);
		map.AddTBString("CR_AccountNumber", null, "银行帐号", true, true, 0, 50, 100);
		map.AddTBString("CR_FisrstCode", null, "名称首字符", true, true, 0, 50, 100);
		map.AddTBString("CR_UnitPostCode", null, "注册地址", true, true, 0, 50, 100);
		map.AddTBString("CR_Qualification", null, "NC_ID", true, true, 0, 50, 100);
		map.AddTBString("CR_QualityTime", null, "NC_ID", true, true, 0, 50, 100);
		map.AddTBString("CR_Scope", null, "经营范围", true, true, 0, 50, 100);
		map.AddTBString("CR_Staff", null, "NC_ID", true, true, 0, 50, 100);
		map.AddTBString("MUser", null, "多用户", true, true, 0, 50, 100);
		map.AddTBString("SUser", null, "单用户", true, true, 0, 50, 100);
		map.AddTBString("CR_Fax", null, "传真号", true, true, 0, 50, 100);
		map.AddTBString("CR_Remark", null, "NC_ID", true, true, 0, 50, 100);
		map.AddTBString("CR_Level", null, "NC_ID", true, true, 0, 50, 100);
		map.AddTBString("CR_ISJTUnit", null, "是否为集团内单位", true, true, 0, 50, 100);
//		map.AddTBString("CR_ISJTUnitT", null, "NC_ID", true, true, 0, 50, 100);
		map.AddTBString("CR_Credit", null, "客户信用", true, true, 0, 50, 100);
		map.AddTBString("CR_CreditCodeStatus", null, "NC_ID", true, true, 0, 50, 100);
//		map.AddTBString("CR_CreditCodeStatusText", null, "NC_ID", true, true, 0, 50, 100);
		map.AddTBString("CR_CreditCodeSimilar", null, "NC_ID", true, true, 0, 50, 100);
		map.AddTBString("CR_TradeTypeT", null, "NC_ID", true, true, 0, 50, 100);
		map.AddTBString("CR_CRTypeT", null, "NC_ID", true, true, 0, 50, 100);
		map.AddTBString("CR_ProvinceT", null, "NC_ID", true, true, 0, 50, 100);


		map.AddTBString("CR_IsInvalid", null, "是否禁用", true, true, 0, 50, 100);
		map.AddTBDateTime("CR_CreatTime", "", "登记时间", true, true);
		map.AddTBDateTime("CR_LastModifyTime", "", "修改时间", true, true);
		map.AddTBInt("CR_IsDel", 0, "CR_IsDel", true, false);
		map.AddTBInt("EntityState", 2, "entitystate", true, false);



		map.AddTBString("TYC_FromTime", null, "经营开始时间", true, true, 0, 50, 100);
		map.AddTBString("TYC_StaffNumRange", null, "人员规模", true, true, 0, 50, 100);
		map.AddTBString("TYC_usedBondName", null, "股票曾用名", true, true, 0, 50, 100);
		map.AddTBString("TYC_RegNumber", null, "注册号", true, true, 0, 50, 100);
		map.AddTBString("TYC_RegCapital", null, "注册资本", true, true, 0, 50, 100);
		map.AddTBString("TYC_RegInstitute", null, "登记机关", true, true, 0, 50, 100);
		map.AddTBString("TYC_Industry", null, "行业", true, true, 0, 50, 100);
		map.AddTBString("TYC_Tags", null, "企业标签", true, true, 0, 50, 100);
		map.AddTBString("TYC_ToTime", null, "经营结束时间", true, true, 0, 50, 100);
		map.AddTBString("TYC_TaxNumber", null, "纳税人识别号", true, true, 0, 50, 100);
		map.AddTBString("TYC_ApprovedTime", null, "核准时间", true, true, 0, 50, 100);
		map.AddTBString("TYC_Property3", null, "英文名", true, true, 0, 50, 100);
		map.AddTBString("TYC_Alias", null, "简称", true, true, 0, 50, 100);
		map.AddTBString("TYC_OrgNumber", null, "组织机构代码", true, true, 0, 50, 100);
		map.AddTBString("TYC_RegStatus", null, "企业状态", true, true, 0, 50, 100);
		map.AddTBString("TYC_UpdateTimes", null, "更新时间", true, true, 0, 50, 100);
		map.AddTBString("TYC_EstiblishTime", null, "成立日期", true, true, 0, 50, 100);
		map.AddTBString("TYC_BondType", null, "股票类型", true, true, 0, 50, 100);
		map.AddTBString("TYC_ActualCapital", null, "实收注册资金", true, true, 0, 50, 100);
		map.AddTBString("TYC_CompanyOrgType", null, "企业类型", true, true, 0, 50, 100);
		map.AddTBString("TYC_HistoryNames", null, "曾用名", true, true, 0, 50, 100);
		map.AddTBString("TYC_HistoryNameList", null, "曾用名", true, true, 0, 50, 100);
		map.AddTBString("TYC_BondNum", null, "股票号", true, true, 0, 50, 100);
		map.AddTBString("TYC_RegCapitalCurrency", null, "注册资本币种 人民币 美元 欧元 等", true, true, 0, 50, 100);
		map.AddTBString("TYC_ActualCapitalCurrency", null, "实收注册资本币种 人民币 美元 欧元 等", true, true, 0, 50, 100);
		map.AddTBString("TYC_RevokeDate", null, "吊销日期", true, true, 0, 50, 100);
		map.AddTBString("TYC_RevokeReason", null, "吊销原因", true, true, 0, 50, 100);
		map.AddTBString("TYC_CancelReason", null, "注销日期", true, true, 0, 50, 100);
		map.AddTBString("TYC_CancelDate", null, "注销原因", true, true, 0, 50, 100);
		map.AddTBString("TYC_Base", null, "省份简称", true, true, 0, 50, 100);
		map.AddTBString("TYC_City", null, "市", true, true, 0, 50, 100);
		map.AddTBString("TYC_District", null, "区", true, true, 0, 50, 100);
		map.AddTBString("TYC_Category", null, "国民经济行业分类门类", true, true, 0, 50, 100);
		map.AddTBString("TYC_CategoryBig", null, "国民经济行业分类大类", true, true, 0, 50, 100);
		map.AddTBString("TYC_CategoryMiddle", null, "国民经济行业分类中类", true, true, 0, 50, 100);
		map.AddTBString("TYC_CategorySmall", null, "国民经济行业分类小类", true, true, 0, 50, 100);
		map.AddTBString("TYC_BondName", null, "股票名", true, true, 0, 50, 100);
		map.AddTBString("TYC_CategoryCodeFirst", null, "门类行业代码", true, true, 0, 50, 100);
		map.AddTBString("TYC_CategoryCodeSecond", null, "大类行业代码", true, true, 0, 50, 100);
		map.AddTBString("TYC_CategoryCodeThird", null, "中类行业代码", true, true, 0, 50, 100);
		map.AddTBString("TYC_CategoryCodeFourth", null, "小类行业代码", true, true, 0, 50, 100);
		map.AddTBString("TYC_Email", null, "邮箱", true, true, 0, 50, 100);
		map.AddTBString("TYC_EmailList", null, "邮箱", true, true, 0, 50, 100);
		map.AddTBString("TYC_WebsiteList", null, "网址", true, true, 0, 50, 100);


		map.AddTBInt("TYC_Type", 0, "法人类型，1 人 2 公司", true, false);
		map.AddTBInt("TYC_IsMicroEnt", 0, "是否是小微企业 0不是 1是", true, false);
		map.AddTBInt("TYC_CompForm", 0, "组成形式，1-个人经营、2-家庭经营", true, false);
		map.AddTBInt("TYC_PercentileScore", 0, "企业评分", true, false);
		map.AddTBInt("TYC_SocialStaffNum", 0, "参保人数", true, false);


		this.set_enMap(map);
		return this.get_enMap();
	}

	public final void setValByKey(String key, String value) throws Exception {
		this.SetValByKey(key, value);
	}

	@Override
	protected boolean beforeUpdateInsertAction() throws Exception
	{
		return super.beforeUpdateInsertAction();
	}

	@Override
	protected boolean beforeDelete() throws Exception
	{
		return super.beforeUpdateInsertAction();
	}
	/** 
	 获取集合
	*/
	@Override
	public Entities GetNewEntities()
	{
		return new EmpSettings();
	}

}
